package model

import (
	"gorm.io/gorm"
	"time"
)

type Video struct {
	Id        int64          `gorm:"column:id;type:bigint(20);primaryKey;not null;" json:"id"`
	UserId    int64          `gorm:"column:user_id;type:bigint(20);not null;" json:"user_id"`
	Name      string         `gorm:"column:name;type:varchar(255);not null;" json:"name"`
	Sex       string         `gorm:"column:sex;type:varchar(255);not null;" json:"sex"`
	Status    string         `gorm:"column:status;type:varchar(255);not null;" json:"status"`
	People    int64          `gorm:"column:people;type:bigint(20);not null;" json:"people"`
	Gift      int64          `gorm:"column:gift;type:bigint(20);not null;" json:"gift"`
	CreateAt  time.Time      `gorm:"column:create_at;type:datetime(3);not null;default:CURRENT_TIMESTAMP(3);" json:"create_at"`
	UpdateAt  time.Time      `gorm:"column:update_at;type:datetime(3);not null;default:CURRENT_TIMESTAMP(3);" json:"update_at"`
	DeletedAt gorm.DeletedAt `gorm:"column:deleted_at;type:datetime(3);default:NULL;" json:"deleted_at"`
	Img       string         `gorm:"column:img;type:varchar(255);not null;" json:"img"`
}

func (v *Video) TableName() string {
	return "video"
}
